From: Stefano Stabellini Date: Tue, 28 Feb 2017 18:56:14 +0000 (-0800) Subject: xen/arm: warn if dom0_mem is not specified X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2630 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=8222557798768995e81c53aee3c273ea9503afb5;p=xen.git xen/arm: warn if dom0_mem is not specified The default dom0_mem is 128M which is not sufficient to boot a Ubuntu based Dom0. It is not clear what a better default value could be. Instead, loudly warn the user when dom0_mem is unspecified and wait 3 secs. Then use 512M. Update the docs to specify that dom0_mem is required on ARM. (The current xen-command-line document does not actually reflect the current behavior of dom0_mem on ARM correctly.) Signed-off-by: Stefano Stabellini Reviewed-by: Julien Grall Reviewed-by: Wei Liu --- diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index 3acbb33787..deeedf9809 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -603,7 +603,13 @@ For example, with `dom0_max_vcpus=4-8`: > 8 | 8 > 10 | 8 -### dom0\_mem +### dom0\_mem (ARM) +> `= ` + +Set the amount of memory for the initial domain (dom0). It must be +greater than zero. This parameter is required. + +### dom0\_mem (x86) > `= List of ( min: | max: | )` Set the amount of memory for the initial domain (dom0). If a size is diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 048eb3987d..de59e5fd0e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -30,14 +31,11 @@ integer_param("dom0_max_vcpus", opt_dom0_max_vcpus); int dom0_11_mapping = 1; -#define DOM0_MEM_DEFAULT 0x8000000 /* 128 MiB */ -static u64 __initdata dom0_mem = DOM0_MEM_DEFAULT; +static u64 __initdata dom0_mem; static void __init parse_dom0_mem(const char *s) { dom0_mem = parse_size_and_unit(s, &s); - if ( dom0_mem == 0 ) - dom0_mem = DOM0_MEM_DEFAULT; } custom_param("dom0_mem", parse_dom0_mem); @@ -2125,6 +2123,12 @@ int construct_dom0(struct domain *d) BUG_ON(v->is_initialised); printk("*** LOADING DOMAIN 0 ***\n"); + if ( dom0_mem <= 0 ) + { + warning_add("PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW\n"); + dom0_mem = MB(512); + } + iommu_hwdom_init(d);